<template>
  <div class="movie">
    <h1>我想看的电影名字必须是4-6的长度</h1>
    <ul>
      <li v-for="movie in myMovieList" :key="movie.tvId">
        {{ movie.albumName }}
      </li>
    </ul>
    <br />
    <h1>我想看的电影名字必须是我传递的长度</h1>
    <ul>
      <li v-for="movie in MovieListLength" :key="movie.tvId">
        {{ movie.albumName }}
      </li>
    </ul>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
    name: "MovieList",

    computed:{
      //拿到getters中的数据 不传参
      ...mapGetters(["myMovieList"]),

      //拿到getters中的数据 传参 计算属性要传参就返回一个函数
      MovieListLength(){
        return this.$store.getters.yourMovieList({start: 2 , end: 4})
      }


    },

}
</script>

<style scoped>
.movie{
    margin: 20px;
    background-color: aqua;
}
</style>